package cn.iocoder.yudao.module.promotion.controller.admin.points.vo.pointsactivity;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import javax.validation.constraints.NotNull;
import java.math.BigDecimal;
import java.time.LocalDateTime;

import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;

/**
 * 积分活动 Base VO，提供给添加、修改、详细的子 VO 使用
 * 如果子 VO 存在差异的字段，请不要添加到这里，影响 Swagger 文档生成
 */
@Data
public class PointsActivityBaseVO {

    @Schema(description = "活动名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "李四")
    @NotNull(message = "活动名称不能为空")
    private String name;

    @Schema(description = "活动描述", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotNull(message = "活动描述不能为空")
    private String des;

    @Schema(description = "开始时间", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotNull(message = "开始时间不能为空")
    @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
    private LocalDateTime startTime;

    @Schema(description = "结束时间", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotNull(message = "结束时间不能为空")
    @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
    private LocalDateTime endTime;

    @Schema(description = "活动状态：0开启 1关闭", requiredMode = Schema.RequiredMode.REQUIRED, example = "2")
    private Byte status;

    @Schema(description = "活动类型（取自数据字典）", example = "2")
    private Byte activityType;

    @Schema(description = "积分", example = "2000")
    private Integer points;

    @Schema(description = "积分价格", example = "489.00")
    private Integer pointsPrice;

    @Schema(description = "活动图片", example = "")
    private String imgUrl;

    @Schema(description = "详情页分类图片", example = "")
    private String detailImgUrl;
}
